package untitled2;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;

public class Text3 {
    public static void main(String[] args) throws Exception{
        InputStream in = new FileInputStream("D:\\测试\\读取的文件.txt");
        OutputStream out = new FileOutputStream("D:\\测试\\写入的目标文件.txt");
        int len;
        while ((len=in.read())!=-1){
            out.write(len);
        }
        in.close();
        out.close();
    }
}
